<!-- Modal 1 :: Start a Conversation-->
        <div class="modal modal-lg-fullscreen fade" id="startConversation" tabindex="-1" role="dialog" aria-labelledby="startConversationLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="startConversationLabel">新建对话</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body p-0 hide-scrollbar">
                    <div class="row">
                   

                        <div class="col-12">
                                <!-- List Group Start -->
                                <ul class="list-group list-group-flush">

                                <?php foreach ($assistants as $k => $vo): ?>
                                <!-- List Group Item Start -->
                                <li class="list-group-item" data-dismiss="modal" onclick="createSession('{:$vo["id"]}')">
                                    <div class="media">
                                        <div class="avatar avatar-online mr-2">
                                            <img src="__UPLOAD__/{:$vo['image']}" alt="">
                                        </div>

                                        <div class="media-body">
                                            <h6 class="text-truncate">
                                                <a href="javascript:void(0);" class="text-reset">{:$vo['name']}</a>
                                            </h6>

                                            <p class="text-muted mb-0">Online</p>
                                        </div>
                                    </div>
                                </li>
                                <!-- List Group Item End -->
                                <?php endforeach ?>


                            </ul>
                            <!-- List Group End -->
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>

        <!-- Modal 2 :: Create Group -->
        <div class="modal modal-lg-fullscreen fade" id="createGroup" tabindex="-1" role="dialog" aria-labelledby="createGroupLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title js-title-step" id="createGroupLabel">&nbsp;</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body py-0 hide-scrollbar">
                        <div class="row pt-2" data-step="1" data-title="合同审查">
                            
                            <!-- <div class="col-12">
                                <div class="form-group">
                                    <label for="htsc_file_url">文件完整URL</label>
                                    <input type="text" class="form-control form-control-md" id="htsc_file_url" placeholder="支持PDF/doc/docx格式，文件大小不超过10M">
                                </div>
                            </div> -->
                            <div class="col-12">
                                <div class="form-group">
                                    <label>文件数据文件</label>
                                    <div class="custom-file">
                                        <input type="file" class="custom-file-input" name="htsc_file" id="htsc_file" />
                                        <label class="custom-file-label" for="htsc_file">选择文件，支持PDF/doc/docx格式，文件大小不超过10M</label>
                                    </div>
                                </div>
                            </div>

                            <div class="col-12">
                                <div class="row">
                                    <div class="col-12">
                                        <div class="form-group mb-0">
                                        <label>合同类型</label>
                                        </div>
                                    </div>
                                    <div class="col">
                                        <div class="form-group rounded p-2 border">
                                        <div class="custom-control custom-radio">
                                            <input class="form-check-input" type="radio" name="htsc_type" id="htsc_type1" value="Sales_PartyA" checked>
                                            <label class="form-check-label" for="htsc_type1">
                                                买卖合同审查-甲方立场
                                            </label>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="col">
                                        <div class="form-group rounded p-2 border">
                                        <div class="custom-control custom-radio">
                                            <input class="form-check-input" type="radio" name="htsc_type" id="htsc_type2" value="Sales_PartyB">
                                            <label class="form-check-label" for="htsc_type2">
                                                买卖合同审查-乙方立场
                                            </label>
                                        </div>
                                        </div>
                                    </div>
                                    </div>
                            </div>
                        
                        </div>


                    </div>
                    <div class="modal-footer">
                        <!-- <button type="button" class="btn btn-link text-muted js-btn-step mr-auto" data-orientation="cancel" data-dismiss="modal"></button> -->
                        <button type="button" class="btn btn-secondary  js-btn-step" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" onclick="sendHtsc()">发送</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Modal 2 :: Create Group -->
        <div class="modal modal-lg-fullscreen fade" id="aiDraw" tabindex="-1" role="dialog" aria-labelledby="createGroupLabel2" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title js-title-step" id="createGroupLabel2">&nbsp;AI作画</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body py-0">
                        <div class="row pt-2" data-title="AI作画">
                            
                            <div class="col-12">
                                <div class="form-group">
                                    <label for="aidraw_prompt">生图的文本描述</label>
                                    <textarea class="form-control form-control-md" id="aidraw_prompt" rows="3" placeholder="仅支持中文、日常标点符号。不支持英文，特殊符号，限制 200 字"></textarea>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                    <label for="aidraw_chicun">尺寸</label>
                                    <select class="form-control form-control-md" id="aidraw_chicun">
                                        <option value="512x512">512x512</option>
                                        <option value="640x360">640x360</option>
                                        <option value="360x640">360x640</option>
                                        <option value="1024x1024">1024x1024</option>
                                        <option value="1280x720">1280x720</option>
                                        <option value="720x1280">720x1280</option>
                                        <option value="2048x2048">2048x2048</option>
                                        <option value="2560x1440">2560x1440</option>
                                        <option value="1440x2560">1440x2560</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                    <label><a href="#" onclick="aidrawGj(this)">高级功能 ∨</a></label>
                                </div>
                            </div>
                            <div class="col-12" id="aidrawDiv" style="display:none;">
                                <div class="form-group">
                                    <label for="aidraw_num">生成图片数量</label>
                                    <input type="text" class="form-control form-control-md" id="aidraw_num" placeholder="默认一张，支持生成 1-8 张" value="1">
                                </div>

                                <!-- <div class="form-group">
                                    <label>参考图</label>
                                    <div class="custom-file">
                                        <input type="file" class="custom-file-input" name="aidraw_file" id="aidraw_file" />
                                        <label class="custom-file-label" for="htsc_file">大小不超过 10M，支持jpg/jpeg/png/bmp 格式</label>
                                    </div>
                                </div> -->
                            </div>

                        </div>

                        
                    </div>
                    <div class="modal-footer">
                        <!-- <button type="button" class="btn btn-link text-muted js-btn-step mr-auto" data-orientation="cancel" data-dismiss="modal"></button> -->
                        <button type="button" class="btn btn-secondary  js-btn-step" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" onclick="sendAiDraw()">发送</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Modal 3 :: Invite Others -->
        <div class="modal modal-lg-fullscreen fade" id="promptModal" tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="inviteOthersLabel">指令内容优化结果</h5>
                        
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body hide-scrollbar">
                        <form>
                            <div class="row">
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>优化前内容：</label>
                                        <div id="prompt_content" style="font-size: 14px;color: #9a9494;"></div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label for="prompt_optimize">优化后内容：</label>
                                        <textarea class="form-control form-control-md no-resize hide-scrollbar" id="prompt_optimize" placeholder="" rows="5"></textarea>
                                    </div>
                                </div>
                            </div>
                        </form>
                        
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-link text-muted" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary prompt_paste" data-dismiss="modal">粘贴到聊天框</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Modal 3 :: Invite Others -->
        <div class="modal modal-lg-fullscreen fade" id="contentFeedback" tabindex="-1" role="dialog" aria-labelledby="icontentFeedbackLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="icontentFeedbackLabel">反馈建议</h5>
                        
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body hide-scrollbar">
                        <form>
                            <input type="hidden" name="msg_id" value="" />
                            <div class="row">
                                <div class="col-12">
                                <div class="form-group">
                                    <label for="type">反馈类型</label>
                                    <select class="form-control form-control-md" name="type">
                                        <option value="非最佳回答">非最佳回答</option>
                                        <option value="答非所问">答非所问</option>
                                        <option value="格式问题">格式问题</option>
                                        <option value="没有帮助">没有帮助</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label for="content">建议回答内容</label>
                                        <textarea class="form-control form-control-md no-resize hide-scrollbar" name="content" placeholder="请输入您觉得应该回答的内容" rows="4"></textarea>
                                    </div>
                                </div>
                            </div>
                        </form>
                        
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-link text-muted" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" onclick="saveContentFeedback()" data-dismiss="modal">保存</button>
                    </div>
                </div>
            </div>
        </div>
                
        <!-- Modal 4 :: Notifications -->
        <div class="modal modal-lg-fullscreen fade" id="notificationModal" tabindex="-1" role="dialog" aria-labelledby="notificationModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="notificationModalLabel">Notifications</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body p-0 hide-scrollbar">
                        <div class="row">

                            <div class="col-12">
                                    <!-- List Group Start -->
                                    <ul class="list-group list-group-flush  py-2">

                                    <!-- List Group Item Start -->
                                    <li class="list-group-item">
                                        <div class="media">
                                            <div class="btn btn-primary btn-icon rounded-circle text-light mr-2">
                                                <!-- Default :: Inline SVG -->
                                                <svg class="hw-24" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
                                                </svg>
                                                    
                                                <!-- Alternate :: External File link -->
                                                <!-- <img class="injectable hw-24" src="__STATIC__/index/media/heroicons/outline/user-add.svg" alt=""> -->
                                            </div>

                                            <div class="media-body">
                                                <h6>
                                                    <a href="#">Catherine richardson</a> send you a friend request
                                                </h6>

                                                <p class="text-muted mb-0">5 mins ago</p>
                                            </div>
                                        </div>
                                        <div class="d-flex justify-content-center mt-2">
                                            <button type="button" class="btn btn-outline-danger mx-1">Reject</button>
                                            <button type="button" class="btn btn-primary mx-1">Accept</button>
                                        </div>

                                    </li>
                                    <!-- List Group Item End -->

                                    <!-- List Group Item Start -->
                                    <li class="list-group-item">
                                        <div class="media">
                                            <div class="btn btn-primary btn-icon rounded-circle text-light mr-2">
                                                <!-- Default :: Inline SVG -->
                                                <svg class="hw-24" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                                                </svg>
                                                    
                                                <!-- Alternate :: External File link -->
                                                <!-- <img class="injectable hw-24" src="__STATIC__/index/media/heroicons/outline/check-circle.svg" alt=""> -->
                                            </div>

                                            <div class="media-body">
                                                <h6>
                                                    <a href="#">Katelyn Valdez</a> accepted your friend request
                                                </h6>

                                                <p class="text-muted mb-0">25 mins ago</p>
                                            </div>
                                        </div>
                                    </li>
                                    <!-- List Group Item End -->

                                    <!-- List Group Item Start -->
                                    <li class="list-group-item">
                                        <div class="media">
                                            <div class="btn btn-primary btn-icon rounded-circle text-light mr-2">
                                                <!-- Default :: Inline SVG -->
                                                <svg class="hw-24" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
                                                </svg>

                                                <!-- Alternate :: External File link -->
                                                <!-- <img class="injectable hw-24" src="__STATIC__/index/media/heroicons/outline/photograph.svg" alt=""> -->
                                            </div>

                                            <div class="media-body">
                                                <h6>
                                                    <a href="#">Eva Walker</a> updated profile picture
                                                </h6>

                                                <p class="text-muted mb-0">5 mins ago</p>
                                            </div>
                                        </div>
                                    </li>
                                    <!-- List Group Item End -->

                                    <!-- List Group Item Start -->
                                    <li class="list-group-item">
                                        <div class="media">
                                            <div class="btn btn-primary btn-icon rounded-circle text-light mr-2">
                                                <!-- Default :: Inline SVG -->
                                                <svg class="hw-24" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                                                </svg>
                                                    
                                                <!-- Alternate :: External File link -->
                                                <!-- <img class="injectable hw-24" src="__STATIC__/index/media/heroicons/outline/check-circle.svg" alt=""> -->
                                            </div>

                                            <div class="media-body">
                                                <h6>
                                                    <a href="#">Bonnie Torres</a> accepted your friend request
                                                </h6>

                                                <p class="text-muted mb-0">5 mins ago</p>
                                            </div>
                                        </div>
                                    </li>
                                    <!-- List Group Item End -->

                                    <!-- List Group Item Start -->
                                    <li class="list-group-item">
                                        <div class="media">
                                            <div class="btn btn-primary btn-icon rounded-circle text-light mr-2">
                                                <!-- Default :: Inline SVG -->
                                                <svg class="hw-24" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
                                                </svg>

                                                <!-- Alternate :: External File link -->
                                                <!-- <img class="injectable hw-24" src="__STATIC__/index/media/heroicons/outline/photograph.svg" alt=""> -->
                                            </div>

                                            <div class="media-body">
                                                <h6>
                                                    <a href="#">Christopher Garcia</a> updated profile picture
                                                </h6>

                                                <p class="text-muted mb-0">5 mins ago</p>
                                            </div>
                                        </div>
                                    </li>
                                    <!-- List Group Item End -->


                                </ul>
                                <!-- List Group End -->
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer justify-content-center">
                        <button type="button" class="btn btn-link text-muted">Clear all</button>
                    </div>
                </div>
            </div>
        </div>

